﻿using System.Collections.Generic;
using ShopB2C.Entity;
using ShopB2C.ViewModels;

namespace ShopB2C.Interfaces {
    /// <summary>
    /// 评论接口
    /// </summary>
    public interface IComment {

        #region Comment

        /// <summary>
        /// 修改评论
        /// </summary>
        /// <param name="ce">CommentEntity</param>
        void CommentUpdate(CommentEntity ce);
        /// <summary>
        /// 删除评论
        /// </summary>
        /// <param name="commentIds">评论 id 字符串，“,”分隔</param>
        void CommentDelete(string commentIds);
        /// <summary>
        /// 删除评论
        /// </summary>
        /// <param name="commentIds">评论 id 字符串，“,”分隔</param>
        void CommentAudit(string commentIds);
        /// <summary>
        /// 获取指定 id 的评论
        /// </summary>
        /// <param name="commentId">评论 id</param>
        /// <returns>CommentEntity</returns>
        CommentEntity GetCommentById(int commentId);
        /// <summary>
        /// 获取评论列表
        /// </summary>
        /// <param name="cp">评论参数传递类</param>
        /// <returns>List</returns>
        List<CommentEntity> GetCommentList(CommentParameters cp);
        /// <summary>
        /// 获取评论统计
        /// </summary>
        /// <param name="productId">商品 id</param>
        /// <returns>List</returns>
        List<CommentCount> GetCommentCount(int productId);
        /// <summary>
        /// 获取最新的指定数量的评论
        /// </summary>
        /// <param name="top">指定获取的条数</param>
        /// <returns>List</returns>
        List<CommentEntity> GetCommentHot(int top);
        /// <summary>
        /// 获取有评论的商品
        /// </summary>
        /// <param name="audit">审核条件</param>
        /// <param name="pageSize">分页数量</param>
        /// <param name="pageIndex">当前页码</param>
        /// <param name="pageCount">总页数</param>
        /// <returns>List</returns>
        List<ProductEntity> GetCommentProduct(bool? audit, int pageSize, int pageIndex, out int pageCount);

        #endregion

    }
}
